package com.woniuxy.service;

import com.woniuxy.entity.DTO.AddressDTO;
import com.woniuxy.entity.DTO.DeleteBatchShoppingCartGoodsDTO;
import com.woniuxy.entity.DTO.QueryShoppingCartGoodsDTO;
import com.woniuxy.entity.ShoppingCarts;

import java.text.ParseException;
import java.util.List;

public interface ShoppingCartService {
    /**
     * 用户端我的订单再次购买
     */
    Boolean buyAgain(String orderId) throws ParseException;
    Boolean addShoppingCartByProductId(ShoppingCarts shoppingCarts) throws ParseException;

    /**
     * <p>用户端小程序购物车页面查询所有购物车信息。</p>
     *
     * @return 购物车商品列表
     */
    List<QueryShoppingCartGoodsDTO> queryShoppingCart() throws ParseException;

    /**
     * <p>批量删除用户选中的购物车商品。</p>
     *
     * @param deleteBatchShoppingCartGoodsDTOs 用户选中的购物车商品
     */
    void deleteBatchShoppingCartGoods(List<DeleteBatchShoppingCartGoodsDTO> deleteBatchShoppingCartGoodsDTOs) throws ParseException;

    /**
     * <p>添加普通商品到购物车</p>
     * @param goodsId
     */
    void addShoppingCartForCommonGoods(Integer goodsId) throws ParseException;

    /**
     * <p>查询用户默认收货地址</p>
     * @return
     */
    AddressDTO queryDefaultAddress() throws ParseException;
}
